home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / admin / accounts / acct-1.3 / acct-1 / acct-1.3.73 / README < prev   
Text File  |  1996-03-12  |  2KB  |  59 lines

  1. The patches here, in this directory, are for
  2. Linux-1.2.0-Linux-1.3.26, Linux-1.3.61-Linux-1.3.69,
  3. Linux-1.3.70 and Linux-1.3.71-Linux-1.3.72. Process accounting
  4. finally found its way to mainstream kernel in Linux-1.3.73.
  5.  
  6. If necessary, apply apropriate patch with command like
  7. "patch -p0 < kernel_diffs-1.2.0" in the /usr/src dir. So
  8.  
  9. 1) cd /usr/src
  10. 2) patch -p0 < <where_ever_you_put_it>/kernel_diffs-1.2.0
  11. or
  12. 2) patch -p0 < <where_ever_you_put_it>/kernel_diffs-1.3.61
  13.  
  14. Check for rejections and do something to it.
  15. 3) find linux -name \*.rej
  16. The ``something'' may very well be obtaining new patch from
  17. iguana.hut.fi.
  18.  
  19. Patches for other kernels are available as
  20. ftp://iguana.hut.fi/pub/linux/Kernel/Patches/acct_for_1.y.z, where
  21. y and z represent kernel version numbers.
  22.  
  23. After succesful patching cd to /usr/src/linux and do a "make config;
  24. make dep; make clean; make zImage" (or whatever is your usual kernel
  25. compilation sequence) and that makes a new kernel for you with process
  26. accounting support. When you finished with kernel compilation, install
  27. it. After that go to the utils directory found in the same directory
  28. as this README file. Make the utils and install them.
  29.  
  30. Now reboot and after that all should be ready for process
  31. accounting coming onto stage.
  32.  
  33. To start process accounting for the first time do:
  34. "touch /var/log/acct; /usr/local/sbin/accton /var/log/acct".
  35.  
  36. Add something like "/usr/local/sbin/accton /var/log/acct" to your rc
  37. startup script. And something like "/usr/local/sbin/accton" to the
  38. rc-script that shuts your system down.
  39.  
  40. Have fun and remember to trim accounting file down at times
  41. as it tends to grow quite rapidly.
  42.  
  43. For this you may use the handleacct.sh shell script found in
  44. scripts directory. I have following line in iguana.hut.fi's
  45. /etc/crontab file:
  46.  
  47. # Trim accounting file down hourly and save old files compressed for 97 hours
  48. 00 * * * * root /usr/local/sbin/handleacct.sh -c -s 97
  49.  
  50. (Iguana.hut.fi spawns at least 18000 processes per hour but may
  51. peak as high as 60000 processes per hour.) If your machine is not
  52. as busy as this machine is, you may very well do the trimming
  53. more seldom. For example in my home machine I trim down
  54. accounting file only once a day.
  55.  
  56.  
  57. Juha Virtanen
  58. <jiivee@iki.fi>
  59.